Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement az-cli warmup on ubuntu #11173

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

lanni-energinet
Copy link
Contributor

@lanni-energinet lanni-energinet commented Dec 12, 2024

Description

This PR fixes #10110.

  • Config + cli-extensions directory is placed in /opt but not in installation dir at /opt/az/ as this is bad practice.
  • Removed cli-extensions directory setup from devops extension as this setting belongs in az-cli setup
  • Added cleanup for telemetry / logs in config directory

Related issue:

#10110

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

Copy link
Contributor

@subir0071 subir0071 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution @lanni-energinet .
We are merging this PR based on our internal test results.

@subir0071 subir0071 merged commit ffe7e6a into actions:main Jan 6, 2025
3 checks passed
@Tolsto
Copy link

Tolsto commented Jan 14, 2025

This change breaks azure/cli with azure/login for me. See Azure/cli#175


# AZURE_CONFIG_DIR shell variable defines where the CLI configuration file for managing behavior are stored
# https://learn.microsoft.com/en-us/cli/azure/azure-cli-configuration#cli-configuration-file
# This path SHOULD be different from the installation directory /opt/az/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration directory of Azure CLI on an agent is /home/runner/.azure.

You may see this using this action:

name: Run Azure Login

on:
  workflow_dispatch:

jobs:
  test:
    runs-on: ubuntu-24.04
    steps:   
    - uses: azure/login@v2
      with:
         creds: ${{ secrets.AZURE_CREDENTIALS }}

    - run: az account get-access-token --debug

The debug log shows:

DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/home/runner/.azure/service_principal_entries.json', encrypt=False

@jiasli
Copy link

jiasli commented Jan 15, 2025

⚠️ The Azure CLI product team demands an immediate revert of this PR!

This PR was merged without fully testing and communication with Azure CLI product team. It breaks azure/cli action (Azure/cli#175) because:

  • azure/cli action assumes AZURE_CONFIG_DIR points to $HOME/.azure
  • azure/cli action directly mounts $HOME/.azure into the docker container, instead of via AZURE_CONFIG_DIR

According to my experience, azure/cli action is not the only user of $HOME/.azure. Moving AZURE_CONFIG_DIR away from $HOME/.azure to another location may unexpectedly break many other users who rely on $HOME/.azure.

Therefore, please immediately revert this PR before this change is rolled out to more users and causes more damage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First run of az-cli is slow
5 participants